#KL26-140 二次元コードの検出精度向上#39
Open
okuyama0528 wants to merge 1 commit into
Open
Conversation
HaruArima08
requested changes
Jul 24, 2026
HaruArima08
left a comment
Collaborator
There was a problem hiding this comment.
日報見ました。
結構精度上がってて、いいと思います。
特に指摘はないけど、一点だけ検出したQRの4頂点の座標も格納するように処理を追加して欲しいです🙇
| @@ -9,12 +9,11 @@ | |||
|
|
|||
| #include <opencv2/core.hpp> | |||
| #include <opencv2/imgproc.hpp> | |||
Collaborator
There was a problem hiding this comment.
これも透視変換系の処理が不要であれば、必要ないかな。(11行目)
Comment on lines
+11
to
+12
| options.setFormats(ZXing::BarcodeFormat::QRCode); | ||
| options.setTryHarder(true); |
|
|
||
| // 透視変換で正面化 | ||
| cv::Mat rectifiedFrame = rectify(frame, corners); | ||
| // 入力画像からZXing用のImageViewを生成 |
Collaborator
There was a problem hiding this comment.
Suggested change
| // 入力画像からZXing用のImageViewを生成 | |
| // 処理対象のフレームからZXing用のImageViewを生成 |
| // 正面化したフレームをデコード | ||
| ZXing::ImageView iv(rectifiedFrame.data, rectifiedFrame.cols, rectifiedFrame.rows, | ||
| ZXing::ImageFormat::BGR, static_cast<int>(rectifiedFrame.step)); | ||
| // 入力画像からQRコードを検出し、デコード結果を取得 |
Collaborator
There was a problem hiding this comment.
Suggested change
| // 入力画像からQRコードを検出し、デコード結果を取得 | |
| // 処理対象のフレームからQRコードを検出し、デコード結果を取得 |
| } | ||
| // QRコードが検出できなかった場合は終了 | ||
| if(!qrCode.isValid()) { | ||
| Logger::error("ZXing detect + decode failed"); |
Collaborator
There was a problem hiding this comment.
Suggested change
| Logger::error("ZXing detect + decode failed"); | |
| Logger::error("QrCodeDetector: QRコードの検出に失敗しました。"); |
| int outputSize = static_cast<int>(outputQrSize + 2.f * quietZoneSize); | ||
| // 検出結果を保存 | ||
| result.wasDetected = true; | ||
| result.content = qrCode.text(); |
Collaborator
There was a problem hiding this comment.
検出結果(QrCodeDetectionResult)は、検出したQRコードの4頂点の座標も格納するようなデータ構造になってると思う。現状、その4頂点の座標を使うかはわからないけど、検出したQRの中央のx座標に向かってカメラ走行するみたいな動作もできるかもしれないから、検出した4頂点の座標も格納したい。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
チェックリスト
変更点
QrCodeDetectorクラス(二次元コード検出器もZxingするように変更)
動作テスト
実験方法
実験結果
https://app.notion.com/p/uom-katlab/3a6dd5b1cc18807f9502c1dca2858b39?source=copy_link
添付資料